home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / ENET.h < prev    next >
Text File  |  1991-04-17  |  3KB  |  93 lines

  1. /************************************************************
  2.  
  3. Created: Thursday, October 4, 1990 at 8:00 AM
  4.     ENET.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc. 1989-1990
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __ENET__
  15. #define __ENET__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __OSUTILS__
  22. #include <OSUtils.h>
  23. #endif
  24.  
  25. #define ENetSetGeneral 253         /*Set "general" mode*/
  26. #define ENetGetInfo 252             /*Get info*/
  27. #define ENetRdCancel 251         /*Cancel read*/
  28. #define ENetRead 250             /*Read*/
  29. #define ENetWrite 249             /*Write*/
  30. #define ENetDetachPH 248         /*Detach protocol handler*/
  31. #define ENetAttachPH 247         /*Attach protocol handler*/
  32. #define ENetAddMulti 246         /*Add a multicast address*/
  33. #define ENetDelMulti 245         /*Delete a multicast address*/
  34.  
  35. #define eLenErr -92            /*Length error ddpLenErr*/
  36. #define eMultiErr -91          /*Multicast address error ddpSktErr*/
  37.  
  38. #define EAddrRType 'eadr'      /*Alternate address resource type*/
  39.  
  40.  
  41. #define EParamHeader \
  42.     QElem *qLink;                /*next queue entry*/\
  43.     short qType;                /*queue type*/\
  44.     short ioTrap;                /*routine trap*/\
  45.     Ptr ioCmdAddr;                /*routine address*/\
  46.     ProcPtr ioCompletion;        /*completion routine*/\
  47.     OSErr ioResult;             /*result code*/\
  48.     StringPtr ioNamePtr;        /*->filename*/\
  49.     short ioVRefNum;            /*volume reference or drive number*/\
  50.     short ioRefNum;             /*driver reference number*/\
  51.     short csCode;                /*Call command code*/
  52.  
  53. typedef struct {
  54.     EParamHeader                    /*General EParams*/
  55.     short eProtType;                    /*Ethernet protocol type*/
  56.     Ptr ePointer;
  57.     short eBuffSize;                    /*buffer size*/
  58.     short eDataSize;                    /*number of bytes read*/
  59. }EParamMisc1;
  60.  
  61. typedef struct {
  62.     EParamHeader
  63.     EParamMisc1 EParms1;        
  64.     char eMultiAddr[5];                    /*Multicast Address*/
  65. }EParamMisc2;
  66.  
  67. typedef union {
  68.     EParamMisc1 EParms1;        
  69.     EParamMisc2 EParms2;        
  70. }EParamBlock;
  71.  
  72. typedef EParamBlock *EParamBlkPtr;
  73.  
  74.  
  75. #ifdef __cplusplus
  76. extern "C" {
  77. #endif
  78. pascal OSErr EWrite(EParamBlkPtr thePBptr,Boolean async); 
  79. pascal OSErr EAttachPH(EParamBlkPtr thePBptr,Boolean async);
  80. pascal OSErr EDetachPH(EParamBlkPtr thePBptr,Boolean async); 
  81. pascal OSErr ERead(EParamBlkPtr thePBptr,Boolean async); 
  82. pascal OSErr ERdCancel(EParamBlkPtr thePBptr,Boolean async);
  83. pascal OSErr EGetInfo(EParamBlkPtr thePBptr,Boolean async);
  84. pascal OSErr ESetGeneral(EParamBlkPtr thePBptr,Boolean async);
  85. pascal OSErr EAddMulti(EParamBlkPtr thePBptr,Boolean async);
  86. pascal OSErr EDelMulti(EParamBlkPtr thePBptr,Boolean async);
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92. #endif
  93.